/*
 * To change this template, choose Tools | Templates
 * and open the template in the editor.
 */

package com.lct.eq2.data;

import java.io.Serializable;
import java.util.ArrayList;

/**
 *
 * @author waite
 */
public class Group implements Serializable {
    static final long serialVersionUID = -7174989444646765961L;
    
    public static final short GROUP_JOINED = 0;
    public static final short GROUP_PLAYER_LEFT = 1;
    public static final short GROUP_PLAYER_JOINED = 2;
    public static final short GROUP_CREATED = 3;
    public static final short GROUP_EXISTS = 4;
    public static final short NO_GROUP_EXISTS = 5;
    
    private short groupType;
    private String groupID;
    ArrayList groupMembers;
    
    public Group(String groupID, short type) {
        this.groupID = groupID;
        this.groupType = type;
    }
    
    public void setGroupMembers(ArrayList list) {
        this.groupMembers = list;
    }
    
    public void setGroupType(short type) {
        this.groupType = type;
    }
    
    public ArrayList getGroupMembers() {
        return this.groupMembers;
    }
    
    public void addMember(String memberID) {
        if (this.groupMembers == null) {
            this.groupMembers = new ArrayList();
        }
        this.groupMembers.add(memberID);
    }
    
    public String getGroupID() {
        return groupID;
    }

    public short getGroupType() {
        return groupType;
    }
}
